﻿using System;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace Sustainalytics.CrmSync.Core.Entities
{
    public class Account
    {
        public Guid Id { get; set; }

        public string Name { get; set; }

        [BsonRepresentation(BsonType.String)]
        public RelationshipType RelationshipType { get; set; }

        public string Office { get; set; }

        public AccountManager AccountManager { get; set; }
        public bool HasPlatformAccess { get; set; }

        [BsonRepresentation(BsonType.String)]
        public AccessLevel PlatformTier { get; set; }

        public bool HasApiAccess { get; set; }

        [BsonRepresentation(BsonType.String)]
        public Status Status { get; set; }

        //api access data
        public string ApiPassword { get; set; }
        public string ApiSecretKey { get; set; }
        public Guid ApiID { get; set; }
        public DateTime ApiExpirationDate { get; set; }

    }

    public enum RelationshipType
    {
        Client = 100000000,
        FormerClient = 100000001,
        Demo = 100000002,
        Prospect = 8
    }
    public enum AccessLevel
    {
        Tier1 = 100000000,
        Tier2 = 100000001,
        Tier3 = 100000002
    }
    public enum Status
    {
        Unknown = -1,
        Active = 0,
        Inactive = 1
    }
}
